let jbAll = document.querySelector('#jbAll');//获取全选按钮
let jbs = document.querySelector('tbody').querySelectorAll('input');
jbAll.onclick = function () {
    for (let i = 0; i < jbs.length; i++) {
        jbs[i].checked = jbAll.checked;
    }
}
for (let i = 0; i < jbs.length; i++) {
    jbs[i].onclick = function () {
        let flag = true;
        for (let j = 0; j < jbs.length; j++) {
            if (!jbs[j].checked) flag = false;
        }
        jbAll.checked = flag;
    }
}